# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
# Contributor: gardar <aur@gardar.net>
pkgname=python-pynetbox
pkgver=7.0.1
pkgrel=1
pkgdesc="NetBox API client library"
arch=('any')
url="https://github.com/digitalocean/pynetbox"
license=('Apache')
depends=('python' 'python-requests' 'python-six')
makedepends=('python-setuptools-scm')
source=("https://files.pythonhosted.org/packages/source/p/pynetbox/pynetbox-${pkgver}.tar.gz")
sha256sums=('eba8b5153ca575bc45f39ade1119b9f0a218c83947f84c4bb2df7fc9de4ffa9a')

build() {
	cd "pynetbox-${pkgver}"
	python setup.py build
}

package() {
	cd "pynetbox-${pkgver}"
	install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}
